@model WalkingTec.Mvvm.Doc.ViewModels.MajorVms.MajorVm

<wt:fieldset field-set-style="Simple" title="Selector">
 </wt:fieldset>
   <p>Selector are used to process scenarios that require additional pop-up pages for searching to select data. Common properties are:</p>
        <table lay-filter="parse-table-demo">
            <thead>
                <tr>
                    <th lay-data="{field:'username', width:200}">properties</th>
                    <th lay-data="{field:'joinTime', width:600}">Description</th>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td>Id</td>
                    <td>Control ID, generated by default according to the bound field name</td>
                </tr>
                <tr>
                    <td>Field</td>
                    <td>Binding field, required</td>
                </tr>
                <tr>
                    <td>Disabled</td>
                    <td>Disabled,or not</td>
                </tr>
                <tr>
                    <td>Name</td>
                    <td>Control name, generated by default according to the bound field name</td>
                </tr>
                <tr>
                    <td>LabelText</td>
                    <td>Label content</td>
                </tr>
                <tr>
                    <td>LabelWidth</td>
                    <td>Label length, default= 80</td>
                </tr>
                <tr>
                    <td>HideLabel</td>
                    <td>Hide label,or not</td>
                </tr>
                <tr>
                    <td>EmptyText</td>
                    <td>Prompt text when there is no data</td>
                </tr>
                <tr>
                    <td>SelectButtonText</td>
                    <td>Select button text, default: 'select'</td>
                </tr>
                <tr>
                    <td>WindowTitle</td>
                    <td>title of the Select window</td>
                </tr>
                <tr>
                    <td>Display</td>
                    <td>display mode,or not.; Can not operate under display mode ,only the selected data is displayed; default= false</td>
                </tr>
                <tr>
                    <td>MultiSelect</td>
                    <td>enable multi selection,or not. If Array or Listis bound, multi selection will be enabled automatically</td>
                </tr>
                <tr>
                    <td>WindowWidth</td>
                    <td>Width of Pop up window</td>
                </tr>
                <tr>
                    <td>WindowHeight</td>
                    <td>Height of Pop up window</td>
                </tr>
                <tr>
                    <td>ListVM</td>
                    <td>ListVMassociated with Pop up </td>
                </tr>
                <tr>
                    <td>TextBind</td>
                    <td>Field used to display text after selecting data</td>
                </tr>
                <tr>
                    <td>ValBind</td>
                    <td>Field used to transfer value after selecting data</td>
                </tr>
                <tr>
                    <td>SubmitFunc</td>
                    <td>JS triggered after confirming data selection</td>
                </tr>
            </tbody>
        </table>
    <wt:quote>
        <p>In addition to field binding, the Selector also needs to bind a ListVM to display the list data in a pop-up window. You can add a ListVM property to your own VM and initialize it accordingly to make Selector bind this ListVM.</p>
    </wt:quote>
        <wt:tab>
            <wt:tabheaders>
                <wt:tabheader title="Effect" />
                <wt:tabheader title="Code" />
            </wt:tabheaders>
            <wt:tabcontents>
                <wt:tabcontent>
                    <wt:form vm="@Model" style="max-width:600px;">
                        <wt:textbox field="Entity.MajorName" />
                        <wt:selector field="Entity.Students"  list-vm="StudentList" text-bind="StudentList.EntityList[0].Name">
                        </wt:selector>
                        <wt:row align="AlignEnum.Right">
                            <wt:submitbutton disabled="true" />
                            <wt:closebutton disabled="true" />
                        </wt:row>
                    </wt:form>
                </wt:tabcontent>
                <wt:tabcontent>
                    <wt:code>
&ltwt:form vm="@Model" width="600"&gt
    &ltwt:textbox field="Entity.MajorName" /&gt
    &ltwt:selector field="Entity.Students"  list-vm="StudentList" text-bind="StudentList.EntityList[0].Name"&gt
    &lt/wt:selector&gt
    &ltwt:row align="AlignEnum.Right"&gt
        &ltwt:submitbutton disabled="true" /&gt
        &ltwt:closebutton disabled="true" /&gt
    &lt/wt:row&gt
&lt/wt:form&gt

                    </wt:code>
                </wt:tabcontent>
            </wt:tabcontents>
        </wt:tab>

<wt:fieldset field-set-style="Simple" title="Selector">
    <p>In the pop-up list of the Selector, you can also add search criteria, such as:</p>
    <wt:tab>
        <wt:tabheaders>
            <wt:tabheader title="Effect" />
            <wt:tabheader title="Code" />
        </wt:tabheaders>
        <wt:tabcontents>
            <wt:tabcontent>
                <wt:form vm="@Model" style="max-width:600px;">
                    <wt:textbox field="Entity.MajorName" />
                    <wt:selector field="Entity.Students2" list-vm="StudentList" text-bind="StudentList.EntityList[0].Name" select-button-text="Filter">
                        <wt:searchpanel vm="StudentList">
                            <wt:row items-per-row=" ItemsPerRowEnum.Two">
                                <wt:textbox field="StudentList.Searcher.LoginName" />
                                <wt:combobox field="StudentList.Searcher.Sex" empty-text="All"/>
                            </wt:row>
                        </wt:searchpanel>

                    </wt:selector>
                    <wt:row align="AlignEnum.Right">
                        <wt:submitbutton disabled="true" />
                        <wt:closebutton disabled="true" />
                    </wt:row>
                </wt:form>
            </wt:tabcontent>
            <wt:tabcontent>
                <wt:code>
&ltwt:form vm="@Model" width="600"&gt
    &ltwt:textbox field="Entity.MajorName" /&gt
    &ltwt:selector field="Entity.Students2" list-vm="StudentList" text-bind="StudentList.EntityList[0].Name" select-button-text="Filter"&gt
        &ltwt:searchpanel vm="StudentList"&gt
            &ltwt:row items-per-row=" ItemsPerRowEnum.Two"&gt
                &ltwt:textbox field="StudentList.Searcher.LoginName" /&gt
                &ltwt:combobox field="StudentList.Searcher.Sex" empty-text="All" /&gt
            &lt/wt:row&gt
        &lt/wt:searchpanel&gt

    &lt/wt:selector&gt
    &ltwt:row align="AlignEnum.Right"&gt
        &ltwt:submitbutton disabled="true" /&gt
        &ltwt:closebutton disabled="true" /&gt
    &lt/wt:row&gt
&lt/wt:form&gt
                </wt:code>
            </wt:tabcontent>
        </wt:tabcontents>
    </wt:tab>

</wt:fieldset>

    <script>
    layui.use('code',function(){layui.code({ about: false })})
        layui.table.init('parse-table-demo', {
        limit: 100, page: false
        });
    </script>
<script>
  $("#@Model.ViewDivId").parent().css("height", "auto");
</script>
